﻿using UnityEngine;
using System.Collections;

public class MasterMode : MonoBehaviour
{
	[SerializeField]
	GameObject			m_masterPassUI;

	void Awake()
	{
		m_masterPassUI.SetActive(CodexManager.masterPass);
	}

	void Update()
	{
		if(CodexManager.masterPass && Input.GetKeyDown(KeyCode.Return))
		{
			EnemyCharacter [] allMobs	= FindObjectsOfType(typeof(EnemyCharacter)) as EnemyCharacter[];

			foreach(EnemyCharacter enemy in allMobs)
			{
				if(enemy.gameObject.tag != "TheClockhand")
				{
					//enemy.curHP	= 0;
					enemy.DoDie();
				}
			}
		}
	}
}
